package com.lw.extraceim.ui.activity.user;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

import com.lw.extraceim.R;
import com.lw.extraceim.ui.activity.base.BaseActivity;

public class UserInfoActivity extends BaseActivity implements View.OnClickListener {
    private Button mButtonChangeInfo,mButtonChangePassword;
    private ImageButton mImageBtnSelfIcon;//更改头像的imageButton
    private ImageButton mImageButtonBack;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public void initView() {
        setContentView(R.layout.activity_user_info);
        mButtonChangeInfo=findViewById(R.id.btn_change_info);
        mButtonChangePassword=findViewById(R.id.btn_change_password);
        mImageBtnSelfIcon=findViewById(R.id.imagebutton_change_selficon);
        mImageButtonBack=findViewById(R.id.btn_back);
    }

    @Override
    public void initData() {

    }

    @Override
    public void refreshUI() {

    }

    @Override
    public void initEvent() {
        mButtonChangePassword.setOnClickListener(this);
        mButtonChangeInfo.setOnClickListener(this);
        mImageBtnSelfIcon.setOnClickListener(this);
        mImageButtonBack.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {

        switch (v.getId())
        {
            case R.id.btn_change_info:
               Intent intent=new Intent(getApplicationContext(),UserChangeActivity.class);
               startActivity(intent);
                break;
            case R.id.btn_change_password:
                Intent intent1=new Intent(getApplicationContext(),ChangePassActivity.class);
                startActivity(intent1);
                break;
            case R.id.imagebutton_change_selficon:
                //开启图集或者相机
                break;
            case R.id.btn_back:
                finish();
                break;
        }

    }

    @Override
    public void onBackPressed() {
        finish();
    }
}
